

class Slog:
    instance = None
    def __new__(cls, *args, **kwargs):
        print("Singleton log system by Garry Guo newing")
        if(cls.instance == None):
            cls.instance = object.__new__(cls)
            return cls.instance

        else:
            return cls.instance
    def __init__(self,format):
        print(" init  method called  ")
        self.format = format



slog1 = Slog("txt")
slog2 = Slog("screen")
print(slog1.format)
print(slog2.format)
print(id(slog1))
print(id(slog2))
